/*
 *	dict.h
 *	  part of the xlibrary by SunDEV (http://sundev.890m.com)
 *
 *	Changelog :
 *	  ##-##-## : First public release
 *
 */

#ifndef _DICT_H
#define _DICT_H

#include "llist.h"

typedef struct {
	LLIST *start;
	LLIST *end;
	u32 numel;
} DICT;

DICT *	ld_new				();
bool	ld_is_valid			(DICT *sl);
void	ld_set_key_str		(DICT *sl, char *key, char *str);
void *	ld_set_key_data		(DICT *sl, char *key, void *data, u32 dataSize);
u32		ld_get_num_el		(DICT *sl);
char *	ld_get_key_str		(DICT *sl, char *key);
void *	ld_get_key_data		(DICT *sl, char *key, u32 *dataSize);
void *	ld_get_first_data	(DICT *sl, char **key, u32 *dataSize);
void *	ld_get_next_data	(DICT *sl, char **key, u32 *dataSize);
void	ld_del_key			(DICT *sl, char *key);
void	ld_del				(DICT *sl);

#endif

